package com.cy.zs.hp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cy.zs.hp.model.HisDoctor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 医师相关 Mapper 接口
 * </p>
 *
 * @author cgb2008
 * @since 2020-11-28
 */

@Mapper
public interface HisDoctorMapper extends BaseMapper<HisDoctor> {
    /*查询所有科室*/
    @Select("select distinct department from his_doctor")
    List<HisDoctor> findDepartment();

    /*根据科室名查询所对应科室的所有医生*/
    @Select("select * from his_doctor where department=#{department}")
    List<HisDoctor> findByDepartment(String department);


    /*根据医生id查询对应的医生信息*/
    @Select("select * from his_doctor where id=#{id}")
    HisDoctor findByDoctorId(Integer DoctorId);
}
